package com.github.slprj.slake.net;

import java.util.List;

/**
 * @author YangXiaoLong
 * 2022/9/24 16:50
 */
public class NioClientConfig extends NioConfig {

    private List<HostPort> hostPorts;
    private int connectTimeoutMillis = 2000 * 60;

    public NioClientConfig() {
        setName("SlNioClient");
        setBizThreads(1);
        setBizQueueSize(500);

        // TODO negotiate with server
        setMaxOutRequests(2000);
        setMaxInRequests(100);
        setMaxInBytes(32 * 1024 * 1024);
    }

    public List<HostPort> getHostPorts() {
        return hostPorts;
    }

    public void setHostPorts(List<HostPort> hostPorts) {
        this.hostPorts = hostPorts;
    }

    public int getConnectTimeoutMillis() {
        return connectTimeoutMillis;
    }

    public void setConnectTimeoutMillis(int connectTimeoutMillis) {
        this.connectTimeoutMillis = connectTimeoutMillis;
    }
}
